package old.proxy.demo3;

import old.proxy.demo2.UserService;
import old.proxy.demo2.UserServiceImp;

//动态代理
public class Test {
    public static void main(String[] args) {
        UserServiceImp userServiceImp = new UserServiceImp();
        InvocationHandelProxy invocationHandelProxy = new InvocationHandelProxy();
        invocationHandelProxy.setTarget(userServiceImp);

        UserService service = (UserService) invocationHandelProxy.getProxy();
        service.add();
    }


}
